package com.yunji.common.model.dto;

import java.io.Serializable;
import java.util.Set;

/**
 * @author : peter-zhu
 * @date : 2024/10/22 10:03
 * @description : TODO
 **/
public class CbWebLogDTO implements Serializable {
    private static final long serialVersionUID = 123457890L;

    private boolean success;
    // 192.168.0.152
    private String ip;
    // http://192.168.0.152:10001/storage/repair/commit
    private String url;
    // /storage/repair/commit
    private String requestMapping;

    private String requestMappingUri;

    private String requestBasePath;

    //POST GET PUT DELETE
    private String httpMethod;
    // com.yunji.web.storage.RepairTicketController.commit
    private String classMethod;
    //请求数据唯一ID 和响应数据同一个ID
    private String requestId;
    // 请求数据
    private Object requestData;
    // 响应数据
    private Object responseData;
    // api [管理端-坏返模块]
    private String api;
    // 新增坏返单
    private String apiOperation;
    // 以上是从切面获取  以下需要从数据库或者redis或者上下文  最好是上下文，但是本系统没上下文
    // 用户名称 上下文获取
    private String username;
    // 时间 系统获取 yyyy-MM-dd hh:mm:ss
    private String operateTime;
    // 昵称
    private String nickname;
    // 所属单位
    private String belongTo;
    // 系统名称
    private String system;
    // 操作类型
    private String operateType;
    // 请求uri
    private String requestUri;
    // 相关 uri
    private String relativeUri;
    // 表名
    private String tableName;
    // 请求方式
    private String requestType;
    // 菜单集合
    private Set<String> menuNameList;
    // 切面时间
    private Long aspectTime;
    // 总消耗时间
    private Long costTime;

    public Long getAspectTime() {
        return aspectTime;
    }

    public void setAspectTime(Long aspectTime) {
        this.aspectTime = aspectTime;
    }

    public Long getCostTime() {
        return costTime;
    }

    public void setCostTime(Long costTime) {
        this.costTime = costTime;
    }

    public String getRequestBasePath() {
        return requestBasePath;
    }

    public void setRequestBasePath(String requestBasePath) {
        this.requestBasePath = requestBasePath;
    }

    public String getRequestMappingUri() {
        return requestMappingUri;
    }

    public void setRequestMappingUri(String requestMappingUri) {
        this.requestMappingUri = requestMappingUri;
    }

    public Set<String> getMenuNameList() {
        return menuNameList;
    }

    public void setMenuNameList(Set<String> menuNameList) {
        this.menuNameList = menuNameList;
    }

    public String getRequestType() {
        return requestType;
    }

    public void setRequestType(String requestType) {
        this.requestType = requestType;
    }

    public String getOperateType() {
        return operateType;
    }

    public void setOperateType(String operateType) {
        this.operateType = operateType;
    }

    public String getRelativeUri() {
        return relativeUri;
    }

    public void setRelativeUri(String relativeUri) {
        this.relativeUri = relativeUri;
    }

    public String getRequestUri() {
        return requestUri;
    }

    public void setRequestUri(String requestUri) {
        this.requestUri = requestUri;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    //    菜单名称  redis获取  而且还要建立表的匹配关系: 比如/storage/repair/commit 对应某某菜单某某按钮
    //    private String menuName;
    //    按钮名称  redis获取  而且还要建立表的匹配关系: 比如/storage/repair/commit 对应某某菜单某某按钮
    //    private String buttonName;

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getRequestMapping() {
        return requestMapping;
    }

    public void setRequestMapping(String requestMapping) {
        this.requestMapping = requestMapping;
    }

    public String getHttpMethod() {
        return httpMethod;
    }

    public void setHttpMethod(String httpMethod) {
        this.httpMethod = httpMethod;
    }

    public String getClassMethod() {
        return classMethod;
    }

    public void setClassMethod(String classMethod) {
        this.classMethod = classMethod;
    }

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public Object getRequestData() {
        return requestData;
    }

    public void setRequestData(Object requestData) {
        this.requestData = requestData;
    }

    public Object getResponseData() {
        return responseData;
    }

    public void setResponseData(Object responseData) {
        this.responseData = responseData;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getOperateTime() {
        return operateTime;
    }

    public void setOperateTime(String operateTime) {
        this.operateTime = operateTime;
    }

    public String getApi() {
        return api;
    }

    public void setApi(String api) {
        this.api = api;
    }

    public String getApiOperation() {
        return apiOperation;
    }

    public void setApiOperation(String apiOperation) {
        this.apiOperation = apiOperation;
    }

    public String getBelongTo() {
        return belongTo;
    }

    public void setBelongTo(String belongTo) {
        this.belongTo = belongTo;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getSystem() {
        return system;
    }

    public void setSystem(String system) {
        this.system = system;
    }

    @Override
    public String toString() {
        return "CbWebLogDTO{" +
                "api='" + api + '\'' +
                ", success=" + success +
                ", ip='" + ip + '\'' +
                ", url='" + url + '\'' +
                ", requestMapping='" + requestMapping + '\'' +
                ", requestMappingUri='" + requestMappingUri + '\'' +
                ", requestBasePath='" + requestBasePath + '\'' +
                ", httpMethod='" + httpMethod + '\'' +
                ", classMethod='" + classMethod + '\'' +
                ", requestId='" + requestId + '\'' +
                ", requestData=" + requestData +
                ", responseData=" + responseData +
                ", apiOperation='" + apiOperation + '\'' +
                ", username='" + username + '\'' +
                ", operateTime='" + operateTime + '\'' +
                ", nickname='" + nickname + '\'' +
                ", belongTo='" + belongTo + '\'' +
                ", system='" + system + '\'' +
                ", operateType='" + operateType + '\'' +
                ", requestUri='" + requestUri + '\'' +
                ", relativeUri='" + relativeUri + '\'' +
                ", tableName='" + tableName + '\'' +
                ", requestType='" + requestType + '\'' +
                ", menuNameList=" + menuNameList +
                ", aspectTime=" + aspectTime +
                ", costTime=" + costTime +
                '}';
    }
}
